#include <algorithm>
#include <iostream>
#include <vector>
#include <cstdio>
using namespace std;

int main()
{
	int n,k,m;
	cin>>n>>k>>m;
	double *res = new double[n];
	vector<int> grades[n];
	for(int i=0; i<n; i++){
		for(int j=0; j<k; j++){
			int x;
			cin>>x;
			grades[i].push_back(x);
		}
		sort(grades[i].begin(),grades[i].end());
		res[i] = 0;
		for(int j=1; j<k-1; j++){
			res[i] += grades[i][j];
		}
		res[i] /= (k-2);
	}
	sort(&res[0],&res[n],[](int i,int j){return i>j;});	
	int i;
	for( i=m-1; i>0; i-- ){
		printf("%.3lf ",res[i]);
	}
	printf("%.3lf\n",res[i]);

	return 0;
}
